package com.mycompany.app.hr.tna.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * equals with shift_master table in seagate t&a
 * 
 * 
 * @author Shawn.guo
 *
 */
@Entity
@Table(name = "tna_shift_master")
public class ShiftMaster {

    @Id
    @Column(name = "shift_master_code")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private String id;

    private String description;

    @Column(name = "is_active")
    private boolean isActive;

    //margin
    //===========================================

    //============================================

    @Column(name = "scheduled_regular_hour")
    private Float scheduledRegularHour;

    @Column(name = "scheduled_punch_in")
    private String scheduledPunchIn;

    @Column(name = "scheduled_punch_out")
    private String schedulePunchOut;

    //Punch In/Out Rule
    /**
     * With Punch In/Out Rule, system can decide if punch time is in or out
     */
    //============================================
    @Transient
    private Integer earlyScheduleMarginOut;

    @Transient
    private Integer earlyScheduleMarginIn;

    @Transient
    private Integer lateScheduleMarginOut;

    @Transient
    private Integer lateScheduleMarginIn;

    //============================================

    @Override
    public String toString() {

        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.SHORT_PREFIX_STYLE);
    }

    //============================================

    public String getId() {

        return id;
    }

    public void setId(String id) {

        this.id = id;
    }

    public String getDescription() {

        return description;
    }

    public void setDescription(String description) {

        this.description = description;
    }

    public Float getScheduledRegularHour() {

        return scheduledRegularHour;
    }

    public void setScheduledRegularHour(Float scheduledRegularHour) {

        this.scheduledRegularHour = scheduledRegularHour;
    }

    public boolean isActive() {

        return isActive;
    }

    public void setActive(boolean isActive) {

        this.isActive = isActive;
    }

    public String getScheduledPunchIn() {

        return scheduledPunchIn;
    }

    public void setScheduledPunchIn(String scheduledPunchIn) {

        this.scheduledPunchIn = scheduledPunchIn;
    }

    public String getSchedulePunchOut() {

        return schedulePunchOut;
    }

    public void setSchedulePunchOut(String schedulePunchOut) {

        this.schedulePunchOut = schedulePunchOut;
    }

    public Integer getEarlyScheduleMarginOut() {

        return earlyScheduleMarginOut;
    }

    public void setEarlyScheduleMarginOut(Integer earlyScheduleMarginOut) {

        this.earlyScheduleMarginOut = earlyScheduleMarginOut;
    }

    public Integer getEarlyScheduleMarginIn() {

        return earlyScheduleMarginIn;
    }

    public void setEarlyScheduleMarginIn(Integer earlyScheduleMarginIn) {

        this.earlyScheduleMarginIn = earlyScheduleMarginIn;
    }

    public Integer getLateScheduleMarginOut() {

        return lateScheduleMarginOut;
    }

    public void setLateScheduleMarginOut(Integer lateScheduleMarginOut) {

        this.lateScheduleMarginOut = lateScheduleMarginOut;
    }

    public Integer getLateScheduleMarginIn() {

        return lateScheduleMarginIn;
    }

    public void setLateScheduleMarginIn(Integer lateScheduleMarginIn) {

        this.lateScheduleMarginIn = lateScheduleMarginIn;
    }

}
